package com.nidu.demo.user.model;

import com.nidu.demo.base.BaseTenantEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
public class UserDepartment extends BaseTenantEntity {
    private Long id;
    private Long userId;
    private Long deptId;

    public static UserDepartment create(Long userId, Long deptId){
        UserDepartment userDept = new UserDepartment();
        userDept.setUserId(userId)
                .setDeptId(deptId);
        return userDept;
    }
} 